// 获取ip
const domain = process.env.domain || 'local';
const host = process.env.host || 'default';

const apiHosterName = host === 'default' ? 'ci' : host;
const apiTestHosterName = host === 'default' ? 'st1' : host;

const config = {
    local: {
        API_BES_URL: `http://sign.${apiHosterName}.dev.lanxinka.com`,
        API_URL: 'http://dev-member-api.lanxinka.com',
        API_MT: `http://lxk-shop.${apiHosterName}.dev.lanxinka.com`,
        // API_JD_URL: `http://${document.domain}:8890`
    },
    development: {
        API_BES_URL: `http://sign.${apiHosterName}.dev.lanxinka.com`, //lxk接口地址
        API_URL: `http://member-api.${apiHosterName}.dev.lanxinka.com`, // 登录接口
        API_MT: `http://shop-api.${apiHosterName}.dev.lanxinka.com`, // 消费场景api接口
        API_JD_URL: `http://shop-h5.${apiHosterName}.dev.lanxinka.com` // 消费场景页面地址
    },
    test: {
        API_BES_URL:`http://sign.${apiTestHosterName}.test.lanxinka.com`,
        // API_URL: 'http://test-member-api.lanxinka.com',
        API_URL: `http://member-api.${apiTestHosterName}.test.lanxinka.com`,
        // API_JD_URL: 'http://test.shop-h5.lanxinka.com',
        API_JD_URL: `http://shop-h5.${apiTestHosterName}.test.lanxinka.com`,
        API_MT: `http://shop.${apiTestHosterName}.test.lanxinka.com`,
        // API_MT: 'http://test.shop.lanxinka.com'
    },
    production: {
        API_BES_URL: 'http://sign.lanxinka.com',
        API_URL: 'http://member-api.lanxinka.com',
        API_MT: 'http://shop-api.lanxinka.com',
        API_JD_URL: 'http://shop.lanxinka.com'
    }
}[domain]

export default config;
